package com.zenith.zongheng.demo.controller;

import com.zenith.zongheng.auth.api.AuthClientService;
import com.zenith.zongheng.auth.api.AuthService;
import com.zenith.zongheng.core.util.StringUtil;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.beans.factory.annotation.Autowired;

import javax.servlet.http.HttpServletRequest;

public class test {
    @Autowired
    @Reference
    private AuthService authService;
    @Autowired
    @Reference
    private AuthClientService authClientService;

    public void test(HttpServletRequest request)
    {
        System.err.println("11111111111");
        String token = StringUtil.defaultString(request.getHeader("token"));
        System.out.println(this.authClientService.getUserSession(token));
    }

    public static void main(String[] args)
    {

    }

}
